//
//  LightController.h
//  GKBHouse
//
//  Created by  on 12-7-13.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NewEquipment.h"
@interface LightController : UIViewController
{
    IBOutlet UIImageView *mainImageView;
    
    IBOutlet UIButton *OnOff;
    IBOutlet UIButton *bright;
    IBOutlet UIButton *stop;
    IBOutlet UIButton *dark;
}
@property (retain) NewEquipment *equipment;
@property (retain) NSString *operation;
@property (retain) NSTimer *autoStopAnimation;
- (id)initWithEquipment:(NewEquipment*)equ;

- (void)initTopBar;
- (void)closeView;

- (void)goBright;
- (void)goDark;
- (void)goStop;

- (void)brightAnimating;
- (void)darkAnimating;
- (void)stopAnimating;

- (void)brightEnd;
- (void)darkEnd;

- (void)setAnimationEnd:(SEL)action;
- (void)AnimationDidStop:(NSTimer *)timer;
- (void)stopTimer;

- (void)operatEnd:(NSDictionary *)dic;
- (void)lightOperat:(NSString *)operat;
- (NSString *)operatEndTipstr:(BOOL)success;
- (void)operatEndTip:(BOOL)success;
#pragma mark - 电器设备开关状态
- (void)ctlDevice;
- (void)ctlDeviceEnd:(NSDictionary *)dic;
- (void)setDeviceOn:(BOOL)on;
- (void)setDeviceState;
@end
